//2.5
import java.util.Scanner;
public class ComputeTotalAndGratuity{
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        System.out.print("Enter the subtotal and a gratuity rate:");
        double subtotal= input.nextDouble();
        double gratuityRate= input.nextDouble()/100;
        double total = subtotal *(1+gratuityRate);
        double gratuity=subtotal*gratuityRate;
        System.out.println("The gratuity is $"+gratuity + " and total is $"+total);
    }
}